﻿<template>
    <elm-page-bb>
        <el-form ref="model" :model="model" size="small" label-width="80px">
            <el-form-item label="单位名称" prop="name" :rules="[{ required: true, message: '名称必须填写'}]">
              <el-input v-model="model.name"></el-input>
            </el-form-item>
            <el-form-item label="上级单位">
              <elm-org v-model="model.pid"></elm-org>
            </el-form-item>
          <elm-row>
            <el-form-item label="联系人">
              <el-input v-model="model.leader"></el-input>
            </el-form-item>
            <el-form-item label="联系电话">
              <el-input v-model="model.phone"></el-input>
            </el-form-item>
          </elm-row>
          <elm-row>
            <el-form-item label="成本归集">
              <elm-code dict_type="org_cost_type" v-model="model.cost_type"></elm-code>
          </el-form-item>
          <el-form-item label="顺序" prop="org_order" :rules="[{ type: 'number', message: '顺序必须为数字'}]">
            <el-input v-model.number="model.sort"></el-input>
          </el-form-item>
           </elm-row>
            <el-form-item label="备注">
                <el-input type="textarea" v-model="model.remark" :rows="2"></el-input>
            </el-form-item>
        </el-form>
        <template #bottom>
            <elm-save-button type="success" size="small" url="/system/org/Upsert" :data="model">立即保存</elm-save-button>
            <el-button @click="close" size="small">取消</el-button>
        </template>
    </elm-page-bb>
</template>

<script>
    export default {
        extends: elmVueBase,
        data() {
            return {
                model: {
                    pid: elm.dialog.request.pid
                },
            }
        },
        async created() {
        },
        methods: {
        }
    }
</script>

<style scoped>
</style>